home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / Pascal / Book Demos in Pascal / SpriteEngine / SE Balls / SpriteStructure.p < prev   
Encoding:
Text File  |  1995-04-04  |  707 b   |  30 lines  |  [TEXT/MWPS]

  1. unit SpriteStructure;
  2.  
  3. {This unit defines the SpriteRecord structure. It i a separate unit since it}
  4. {is likely to be edited.}
  5.  
  6. interface
  7.  
  8. {$setc _hasfixedpoint := true}
  9.  
  10. {$IFC UNDEFINED THINK_PASCAL}
  11.     uses Types, QuickDraw;
  12. {$ENDC}
  13.  
  14.     type
  15.         SpritePtr = ^SpriteRecord;
  16.         SpriteRecord = record
  17. (*Game entity data - edit as desired*)
  18.                 speed: Point;                (* Fixed-point! *)
  19.                 fixedPointPosition: Point;
  20. (*Sprite data - don't remove*)
  21.                 position: Point;            (* Integer screen coordinates! *)
  22.                 face: GrafPtr;                (* Apprearance of the sprite *)
  23.                 drawingRect: Rect;        (* Where is it? *)
  24. (*List pointers - don't remove*)
  25.                 prev, next: SpritePtr;        (* Next enity in the list *)
  26.             end;
  27.  
  28. implementation
  29. end.
  30.